package org.example.protocol;

import java.util.Arrays;

/**
 * 自定义Socket协议
 * @author WZW
 * @date 2020/7/11
 */
public class RacingCarProtocol {

    private int head = 0x76;

    private int length;

    private byte[] content;

    public RacingCarProtocol(int length, byte[] content) {
        this.length = length;
        this.content = content;
    }

    public int getLength() {
        return length;
    }

    public byte[] getContent() {
        return content;
    }

    public int getHead() {
        return head;
    }

    @Override
    public String toString() {
        return "RacingCarProtocol{" +
                "head=" + head +
                ", length=" + length +
                ", content=" + Arrays.toString(content) +
                '}';
    }
}
